home *** CD-ROM | disk | FTP | other *** search
- Path: velveeta.mctec.com!calster
- From: cal@visual.mctec.com (Cal Lin)
- Newsgroups: comp.lang.c++
- Subject: Specifying packing or padding alignment in classes and structs
- Date: 2 Feb 1996 21:46:41 GMT
- Organization: Visual Networks, Inc.
- Message-ID: <4eu0o1$1je@velveeta.mctec.com>
- NNTP-Posting-Host: calvinl.mctec.com
- Keywords: SPARCompiler 4.0.1
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- How do you specify, with a #pragma directive or something else, the packing or
- padding alignment within a class or struct on SUN's SPARCompiler? For
- example, if a struct is declared as follows:
- struct foobar {
- char foo;
- double bar;
- } fb;
- sizeof (fb) should be 9 if packed, 12 if not. On our AIX C++ 3.1 compiler,
- the directive is #pragma align=packed, and on Visual C++, the directive is
- #pragma pack(1).
-
- I've looked through the documentation on the SUN compiler, and have found
- nothing that fits the bill. Does anybody know how to do this on the
- SPARCompiler?
-
- Thanks in advance.
- cal@visual.mctec.com
- (301)208-6793
-